<?php

  require_once 'JooS/File/JAS.php';

  class JooS_File_JavaScript extends JooS_File_JAS {
    public static function getOriginalExt() {
      return "js";
    }

    public function getContentType() {
      return "text/javascript";
    }

    public function getJASFolder() {
      return ".javascript";
    }

    public function getMinifiedContent($value) {
      require_once 'JooS/Minify/JavaScript.php';

      $value = JooS_File::isDebugMode() ? $value : JooS_Minify_JavaScript::minify($value);
      return $this->getUCS2($value);
    }

    public function getUCS2($value) {
      require_once 'JooS/UCS2.php';
      
      return JooS_UCS2::convert($value);
    }
  }

?>